package com.tiezhu.springdemo.mapper;

import com.tiezhu.springdemo.bean.Pet;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;

import java.util.List;

@Mapper
@Repository
public interface PetMapper {

    List<Pet> queryAllByMasterName();

    List<Pet> queryPetByMasterName(String master_name);

    List<Pet> queryPetByPetNameAndMasterName(String pet_name,String master_name);

    Pet queryPetByPetIdAndMasterName(Pet pet);

    int addPet(Pet pet);

    int updatePet(Pet pet);

    int deletePetByPetName(String pet_name,String master_name);
}
